home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / DELPHI32 / GRAPHICS / IMGLIB95 / U_P_SIZE.PA_ / U_P_SIZE.PA
Text File  |  1996-03-31  |  3KB  |  117 lines

  1. {Part of Imagelib VCL/DLL Library.
  2. Written by Jan Dekkers and Kevin Adams (c) 1995. If you are a non
  3. registered client, you may use or alter this demo only for evaluation
  4. purposes.
  5.  
  6. Uses ImageLib 2.2.1 Changed the callback to a function instead of a
  7. procedure to let the user cancel out. Added:
  8.  
  9. Changed callback in version 2.21 to a function with cdecl.
  10. using the C calling convention.
  11.  
  12. scrolling text images
  13. Cut, Copy and Paste to/from the clipboard
  14. Printing bitmaps}
  15.  
  16. unit U_p_size;
  17.  
  18. interface
  19.  
  20. uses
  21. {$IFDEF DEL32}
  22.   Windows,
  23. {$ELSE}
  24.   WinTypes,
  25.   WinProcs,
  26. {$ENDIF}
  27.   Classes,
  28.   Graphics,
  29.   Forms,
  30.   Controls,
  31.   Buttons,
  32.   StdCtrls,
  33.   ExtCtrls,
  34.   Spin;
  35.  
  36. type
  37.   TPrintersize = class(TForm)
  38.     OKBtn: TBitBtn;
  39.     Bevel1: TBevel;
  40.     WidthSpinEdit: TSpinEdit;
  41.     HeigthSpinEdit: TSpinEdit;
  42.     Label1: TLabel;
  43.     Label2: TLabel;
  44.     Label3: TLabel;
  45.     GroupBox1: TGroupBox;
  46.     RadioButton1: TRadioButton;
  47.     RadioButton2: TRadioButton;
  48.     RadioButton3: TRadioButton;
  49.     RadioButton4: TRadioButton;
  50.     RadioButton5: TRadioButton;
  51.     RadioButton6: TRadioButton;
  52.     procedure FormActivate(Sender: TObject);
  53.     procedure RadioButton1Click(Sender: TObject);
  54.     procedure RadioButton2Click(Sender: TObject);
  55.     procedure RadioButton3Click(Sender: TObject);
  56.     procedure RadioButton4Click(Sender: TObject);
  57.     procedure RadioButton5Click(Sender: TObject);
  58.     procedure RadioButton6Click(Sender: TObject);
  59.   private
  60.     { Private declarations }
  61.     bwt, bht : integer;
  62.   public
  63.     { Public declarations }
  64.   end;
  65.  
  66. var
  67.   Printersize: TPrintersize;
  68.  
  69. implementation
  70.  
  71. {$R *.DFM}
  72.  
  73. procedure TPrintersize.FormActivate(Sender: TObject);
  74. begin
  75.  bwt:= WidthSpinEdit.Value;
  76.  bht:=HeigthSpinEdit.Value;
  77. end;
  78.  
  79.  
  80. procedure TPrintersize.RadioButton1Click(Sender: TObject);
  81. begin
  82.  HeigthSpinEdit.Value:=bht;
  83.  WidthSpinEdit.Value:=bwt;
  84. end;
  85.  
  86. procedure TPrintersize.RadioButton2Click(Sender: TObject);
  87. begin
  88.  HeigthSpinEdit.Value:=bht*2;
  89.  WidthSpinEdit.Value:=bwt*2;
  90. end;
  91.  
  92. procedure TPrintersize.RadioButton3Click(Sender: TObject);
  93. begin
  94.  HeigthSpinEdit.Value:=bht*3;
  95.  WidthSpinEdit.Value:=bwt*3;
  96. end;
  97.  
  98. procedure TPrintersize.RadioButton4Click(Sender: TObject);
  99. begin
  100.  HeigthSpinEdit.Value:=bht*4;
  101.  WidthSpinEdit.Value:=bwt*4;
  102. end;
  103.  
  104. procedure TPrintersize.RadioButton5Click(Sender: TObject);
  105. begin
  106.  HeigthSpinEdit.Value:=bht*5;
  107.  WidthSpinEdit.Value:=bwt*5;
  108. end;
  109.  
  110. procedure TPrintersize.RadioButton6Click(Sender: TObject);
  111. begin
  112.  HeigthSpinEdit.Value:=bht*6;
  113.  WidthSpinEdit.Value:=bwt*6;
  114. end;
  115.  
  116. end.
  117.